package org.jjche.common.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;
import org.jjche.common.exception.enums.IBaseErrorCodeEnum;

/**
 * DEMO逻辑错误码枚举
 */
@Getter
@AllArgsConstructor
public enum InfraErrorCodeEnum implements IBaseErrorCodeEnum {
    // ==========  通用模块 1-001-000-000 ==========
    COMMON_APP_NOT_FOUND_ERROR(1001000000, "找不到SpringBootApplication注解"),
    COMMON_FILE_SIZE_ERROR(1001000001, "文件大小超出{}MB限制, 请压缩或降低文件质量"),
    COMMON_RANGE_PARAM_ERROR(1001000002, "区间参数长度必须是2"),
    COMMON_COMMIT_REPEAT_ERROR(1001000003, "请勿重复提交"),
    COMMON_LOCK_ERROR(1001000004, "{}"),

    // ==========  加密模块 1-001-001-000 ==========
    ENC_APPID_ERROR(1001001000, "appId无效"),
    ENC_TIMESTAMP_ERROR(1001001001, "timestamp无效"),
    ENC_NONCE_ERROR(1001001002, "nonce无效"),
    ENC_SIGN_ERROR(1001001003, "sign无效"),


    // ==========  分布式锁模块 1-001-002-000 ==========
    LOCK_NOT(1001002000, "参数有多个,锁模式为->{}.无法锁定"),

    // ==========  应用密钥模块 1-001-003-000 ==========
    APP_SECRET_DESC_BODY_ERROR(1001003000, "解密失败，请检查请求内容"),

    // ==========  认证模块 1-001-004-000 ==========
    AUTH_CHECK_CONFIG_ERROR(1001004000, "验证码配置信息错误！正确配置查看 LoginCodeEnum ");

    private final int code;
    private final String msg;
}
